package com.mrptech.mess.model;

// Generated Feb 15, 2015 10:58:50 PM by Hibernate Tools 4.0.0

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * UserAuditTrail generated by hbm2java
 */
@Entity
@Table(name = "USER_AUDIT_TRAIL")
public class UserAuditTrail implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private UserAuditTrailId id;
	private Users users;
	private String userId;
	private String userActionCode;
	private String actionDesc;
	private String ipAddress;
	private Date actionTakenTime;
	private String actionResult;
	private Date createdOn;
	private Date modifiedOn;

	public UserAuditTrail() {
	}

	public UserAuditTrail(UserAuditTrailId id, Users users) {
		this.id = id;
		this.users = users;
	}

	public UserAuditTrail(UserAuditTrailId id, Users users, String userId,
			String userActionCode, String actionDesc, String ipAddress,
			Date actionTakenTime, String actionResult, Date createdOn,
			Date modifiedOn) {
		this.id = id;
		this.users = users;
		this.userId = userId;
		this.userActionCode = userActionCode;
		this.actionDesc = actionDesc;
		this.ipAddress = ipAddress;
		this.actionTakenTime = actionTakenTime;
		this.actionResult = actionResult;
		this.createdOn = createdOn;
		this.modifiedOn = modifiedOn;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "auditId", column = @Column(name = "AUDIT_ID", nullable = false, precision = 22, scale = 0)),
			@AttributeOverride(name = "accountId", column = @Column(name = "ACCOUNT_ID", nullable = false, precision = 22, scale = 0)) })
	public UserAuditTrailId getId() {
		return this.id;
	}

	public void setId(UserAuditTrailId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ACCOUNT_ID", nullable = false, insertable = false, updatable = false)
	public Users getUsers() {
		return this.users;
	}

	public void setUsers(Users users) {
		this.users = users;
	}

	@Column(name = "USER_ID", length = 30)
	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Column(name = "USER_ACTION_CODE", length = 30)
	public String getUserActionCode() {
		return this.userActionCode;
	}

	public void setUserActionCode(String userActionCode) {
		this.userActionCode = userActionCode;
	}

	@Column(name = "ACTION_DESC", length = 40)
	public String getActionDesc() {
		return this.actionDesc;
	}

	public void setActionDesc(String actionDesc) {
		this.actionDesc = actionDesc;
	}

	@Column(name = "IP_ADDRESS", length = 30)
	public String getIpAddress() {
		return this.ipAddress;
	}

	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "ACTION_TAKEN_TIME", length = 7)
	public Date getActionTakenTime() {
		return this.actionTakenTime;
	}

	public void setActionTakenTime(Date actionTakenTime) {
		this.actionTakenTime = actionTakenTime;
	}

	@Column(name = "ACTION_RESULT", length = 30)
	public String getActionResult() {
		return this.actionResult;
	}

	public void setActionResult(String actionResult) {
		this.actionResult = actionResult;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CREATED_ON", length = 7)
	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "MODIFIED_ON", length = 7)
	public Date getModifiedOn() {
		return this.modifiedOn;
	}

	public void setModifiedOn(Date modifiedOn) {
		this.modifiedOn = modifiedOn;
	}

}
